home *** CD-ROM | disk | FTP | other *** search
- /* $VER: DMTxtSearch.rexx 1.0 (11.10.98) by J. Tierney
-
- DiskMaster II Text Search v1.0
- 10/11/98 J. Tierney
-
- Purpose: Searches selected files for a string pattern.
- If no files are selected then all the files in the directory are
- searched.
- Subdirectories are not searched.
-
- Usage: DMStr
- */
-
- OPTIONS RESULTS
-
- 'CONFIRM "Find Text" Search Cancel " "'
- IF rc ~= 0 THEN EXIT 0
- ptrn = result
-
- 'STATUS P'
- srcpath = result
- IF RIGHT(srcpath, 1) ~= ':' THEN srcpath = srcpath || '/'
-
- DIRLIST SEL FILE
-
- IF list.name.0 = 0 THEN DO
- /* Set the entire source dir to be searched. */
- DIRLIST FILE
- END
-
- DESELECT '*'
-
- DO i = 1 TO list.name.0
- ADDRESS COMMAND 'Search >NIL: FROM' srcpath || list.name.i 'SEARCH' ptrn 'PATTERN'
- IF rc = 0 THEN 'SELECT' list.name.i
- END
-